﻿<?xml version="1.0" ?>
<lz:project xmlns:lz="http://schemas.icitadel.com/Lazarus/Source.xsd"
	          name="MyGoals" 
            namespace="OR.MyGoals" 
            owner="dbo" 
            user="jmuharsky" 
            namespaceprefix="lz" 
            namespaceuri="http://schemas.icitadel.com/projects/MyGoals.xsd">
  
  <lz:description>Sample project for Lazarus.</lz:description>
  
  <lz:datasource location="JOEMU-VS1" schema="MyGoals" />
  
  <lz:defaults>
    <lz:fields>
      <lz:field name="Id" type="Identity">
        <lz:indexes>
          <lz:index type="Primary" />
        </lz:indexes>
      </lz:field>
      <lz:field name="Created" type="DateTime" required="true" readonly="true" autogenerate="true" />
      <lz:field name="Modified" type="DateTime" required="true" readonly="true" />
    </lz:fields>
  </lz:defaults>
  
  <lz:objects>
    <lz:object name="ExpertiseLevel" friendly-name="Expertise Level" title-field="Title">
      <lz:description>Specifies the levels of expertise you may have in a current technology.</lz:description>
      <lz:fields>
        <lz:field name="Rank" type="Int" required="true" />
        <lz:field name="Title" type="Varchar" size="50" />
        <lz:field name="Description" type="Text" />
      </lz:fields>
      <lz:methods>
        <lz:method type="Create" />
        <lz:method type="Update" />
        <lz:method type="Get" />
        <lz:method type="List" />
      </lz:methods>
    </lz:object>

    <lz:object name="Technology" title-field="Title" plural-name="Technologies">
      <lz:description>Specifies a technology for which you are tracking competency.</lz:description>
      <lz:fields>
        <lz:field name="Title" type="Varchar" size="50" />
        <lz:field name="Description" type="Text" />
        <lz:field name="ExpertiseLevel">
          <lz:description>Specifies the level of Expertise you have in the current technology.</lz:description>
          <lz:indexes>
            <lz:index type="Foreign" object="ExpertiseLevel" />
          </lz:indexes>
        </lz:field>
      </lz:fields>
      <lz:methods>
        <lz:method type="Create" />
        <lz:method type="Update" />
        <lz:method type="Get" />
        <lz:method type="List" />
      </lz:methods>
    </lz:object>

    <lz:object name="GoalStatus" friendly-name="Goal Status" title-field="Title" plural-name="GoalStatuses">
      <lz:description>Specifies a technology for which you are tracking competency.</lz:description>
      <lz:fields>
        <lz:field name="Title" type="Varchar" size="50" />
        <lz:field name="Description" type="Text" />
      </lz:fields>
      <lz:methods>
        <lz:method type="Create" />
        <lz:method type="Update" />
        <lz:method type="Get" />
        <lz:method type="List" />
      </lz:methods>
    </lz:object>

    <lz:object name="Goal">
      <lz:description>Defines a goal or milestone.  This may involve one or more of your chosen Technology Focuses.</lz:description>
      <lz:fields>
        <lz:field name="Title" type="Varchar" size="50" required="true">
          <lz:description>Specifies the title of the goal.  This should be a terse description.</lz:description>
        </lz:field>
        <lz:field name="Status" required="true">
          <lz:description>Specifies the status of the goal.  The identifies whether or not you have reached your milestone or goal in totality, or are working towards it.</lz:description>
          <lz:indexes>
            <lz:index type="Foreign" object="GoalStatus" />
          </lz:indexes>
        </lz:field>
      </lz:fields>
      <lz:collections>
        <lz:collection name="RequiredTechnologies" object="Technology" binding-object="GoalRequiredExpertise" binding-field="Goal" />
      </lz:collections>
      <lz:methods>
        <lz:method type="Create" />
        <lz:method type="Update" />
        <lz:method type="Get" />
        <lz:method type="List" />
        <lz:method type="List" name="ListByStatus">
          <lz:method-filters>
            <lz:method-filter field="Status" />
          </lz:method-filters>
        </lz:method>
      </lz:methods>
    </lz:object>

    <lz:object name="GoalRequiredExpertise" type="Intersection">
      <lz:description>Defines which Technology Focuses are is required to satisfy your various goals.</lz:description>
      <lz:fields>
        <lz:field name="Goal" required="true">
          <lz:indexes>
            <lz:index type="Foreign" object="Goal" />
          </lz:indexes>
        </lz:field>
        <lz:field name="Technology" required="true">
          <lz:indexes>
            <lz:index type="Foreign" object="Technology" />
          </lz:indexes>
        </lz:field>
      </lz:fields>
      <lz:methods>
        <lz:method type="Create" />
        <lz:method type="Update" />
        <lz:method type="Get" />
        <lz:method type="List" />
      </lz:methods>
    </lz:object>
  </lz:objects>
</lz:project>